<template>
    <div>
        <div class="widthFull back-fff" style="height: 496px;">
            <adImgView src="" @click="proxy.$comJs.openUrl()"></adImgView>
        </div>
        <div class="header widthFull flex flex-j-c">
            <div class="flex a-tab1 widthFull flex-j-c flex-align ">
                <div v-for="(item,i) in head_tabs" :key="i" :class="i==head_tab_index?'a-tab-p-active a-tab-p':'a-tab-p'" @click="headtabclick(i)">{{ item.name }}</div>
            </div>
        </div>
        <div class="main mainPadding">
            <v1 v-if="head_tab_index == 0" :tabs="head_tabs"> </v1>
        </div>
    </div>
</template>

<script setup>
import { ref,reactive, onMounted,getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
import CryptoJS from 'crypto-js';
import { useRoute, useRouter } from "vue-router";
const Router = useRouter();
import v1 from './home.vue';
// // 路由参数
const nav = proxy.$comJs.decrypt(
        Router.currentRoute.value.query.ob
    ).nav.children
// -------------------------------------------------------------------
    const head_tab_index = ref(0)
    const head_tabs = ref([
        {name:'首页'},...nav
    ])
    const headtabclick = (i) =>{
        head_tab_index.value = i
    }
</script>

<style lang='less' scoped>
    .header{
        background: #d10b00;
        height: 60px;
    }
</style>
